package com.jtjrenren.android.taxi.driver.core.wallect;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.jtjrenren.android.taxi.driver.base.BaseRcyAdapter;
import com.jtjrenren.android.taxi.driver.R;
import com.jtjrenren.android.taxi.driver.bean.api.ApiSrResult;

/**
 * Created by Administrator on 2016/3/16.
 */
public class IncomeHistoryAdapter extends BaseRcyAdapter<ApiSrResult.IncomeListEntity> {
    public IncomeHistoryAdapter(Context context) {
        super(context);
    }

    @Override
    public RecyclerView.ViewHolder getItemViewHolder(ViewGroup parent, int viewType) {
        View view = inflater.inflate(R.layout.item_income_history, parent, false);
        return new IncomeViewHolder(view);
    }

    @Override
    public void onBindItemViewHolder(RecyclerView.ViewHolder holder, int position) {
        IncomeViewHolder incomeViewHolder = (IncomeViewHolder) holder;

        ApiSrResult.IncomeListEntity info = list.get(position);

        incomeViewHolder.tv_count.setText(info.getPayFair());
        incomeViewHolder.tv_date.setText(info.getPayTime());
    }

    public class IncomeViewHolder extends RecyclerView.ViewHolder {
        TextView tv_count, tv_date;

        public IncomeViewHolder(View itemView) {
            super(itemView);

            tv_count = (TextView) itemView.findViewById(R.id.item_income_count);
            tv_date = (TextView) itemView.findViewById(R.id.item_income_date);
        }


    }
}
